function [avgQ,stdQ]=erdos(nSurrogates,nNodes,nEdge)

%nSurrogates=3;

Q=zeros(nSurrogates,1);
for i=1:nSurrogates
    m=makerandCIJ_und(nNodes,nEdge);
    [Q(i)]=computeModMeasures(m);
end
avgQ=mean(Q);
stdQ=std(Q,[],1);

function [Q]=computeModMeasures(M)

s=size(M);
Ci=zeros(1,s(1));
%PartCoef=zeros(1,s(1));
%Zintra=zeros(1,s(1));

[Ci,Q]=modularity_louvain_und(M);
%PartCoef=participation_coef(M,Ci)';
%Zintra=module_degree_zscore(M,Ci)';